<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<WebClient.Models.ViewModels.GroupViewModel>" %>
<div class="AdminPageText">
List Of Restaurant
</div>
<table class="Grid" cellpadding="0" cellspacing="0">
	<thead>
		<tr>
            <th>Image</th>
			<th>Name</th>
			<th>EstimatedServiceTime</th>
			<th>DeliveryDistricts</th>
			<th>TimeStart</th>
			<th>TimeEnd</th>
			<th></th>
			<th></th>
		<tr>
	</thead>
	<% for (int i=0; i<Model.RestaurantModel.GetModel.LstObjModel.Count; i++){
		if (i % 2 != 0) {%>
		<tr class="Row" id="row-<%= Model.RestaurantModel.GetModel.LstObjModel[i].ID %>">
		<% }
		else { %>
		<tr class="AlternatingRow" id="row-<%= Model.RestaurantModel.GetModel.LstObjModel[i].ID %>">
		<% } %>
            <td><img src="<%= Url.Action("ShowRestaurantImage", "Image", new { idrestaurant = Model.RestaurantModel.GetModel.LstObjModel[i].ID })%>" width="60px" height="60px" /></td>
			<td><span style=""><%= Model.RestaurantModel.GetModel.LstObjModel[i].Name %></span></td>
			<td><span style=""><%= Model.RestaurantModel.GetModel.LstObjModel[i].EstimatedServiceTime %> minutes</span></td>
			<td><span style=""><%= Model.RestaurantModel.GetModel.LstObjModel[i].DeliveryDistricts %></span></td>
			<td><span style=""><%= Model.RestaurantModel.GetModel.LstObjModel[i].TimeStart %></span></td>
			<td><span style=""><%= Model.RestaurantModel.GetModel.LstObjModel[i].TimeEnd %></span></td>
			<td>
				<a href="../../Admin/DetailOfRestaurant?id=<%= Model.RestaurantModel.GetModel.LstObjModel[i].ID %>">
					<span style="color: Blue; text-decoration: underline">Select</span>
				</a>
			</td>
			<td>
				<a href="../../Admin/DeleteRestaurant?id=<%= Model.RestaurantModel.GetModel.LstObjModel[i].ID %>&page=<%= Model.RestaurantModel.GetModel.CurrentPage %>" onclick="return confirm('Are you sure you want to Delete it? This action cannot be undone.');">Delete</a>
			</td>
            <%--<%= Url.Action("ShowImage", "Admin", new { image = Model.RestaurantModel.GetModel.LstObjModel[i].Image, contenttype = Model.RestaurantModel.GetModel.LstObjModel[i].ContentType })%>--%>
		</tr>
	<% } %>  
</table>
